import request from '@/utils/request'

// 查询会费列表
export function listDues(query) {
  return request({
    url: '/allocation/dues/list',
    method: 'get',
    params: query
  })
}

// 查询会费详细
export function getDues(id) {
  return request({
    url: '/allocation/dues/' + id,
    method: 'get'
  })
}

// 新增会费
export function addDues(data) {
  return request({
    url: '/allocation/dues',
    method: 'post',
    data: data
  })
}

// 修改会费
export function updateDues(data) {
  return request({
    url: '/allocation/dues',
    method: 'put',
    data: data
  })
}

// 删除会费
export function delDues(id) {
  return request({
    url: '/allocation/dues/' + id,
    method: 'delete'
  })
}

// 消息状态修改
export function changeNoticeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/allocation/dues/changeStatus',
    method: 'put',
    data: data
  })
}
